package com.ssr.ld.vo;

import java.util.List;

import com.ssr.ld.constant.WebConstants;

public class ResultVo {

	private String code;
	private String msg;
	private Long count;
	private List<? extends Object> data;

	public ResultVo(List<? extends Object> data2, Long count, String code, String msg) {
		this.data = data2;
		this.count = count;
		this.code=code;
		this.msg=msg;
	}

	public static ResultVo success(List<? extends Object> data, Long count) {
		return new ResultVo(data, count, WebConstants.SUCCESS, WebConstants.SUCCESS_MSG);
	}

	public static ResultVo fail(List<Object> data, Long count) {
		return new ResultVo(data, count, WebConstants.ERROR, WebConstants.ERROR_MSG);
	}

	public String getCode() {
		return code;
	}

	public void setCode(String code) {
		this.code = code;
	}

	public String getMsg() {
		return msg;
	}

	public void setMsg(String msg) {
		this.msg = msg;
	}

	public Long getCount() {
		return count;
	}

	public void setCount(Long count) {
		this.count = count;
	}

	public List<? extends Object> getData() {
		return data;
	}

	public void setData(List<? extends Object> data) {
		this.data = data;
	}

}
